scrolledwindow: Fix code sample compilation
authorTimm Bäder <mail@baedert.org>
Wed, 3 Jan 2018 12:51:03 +0000 (13:51 +0100)
committerTimm Bäder <mail@baedert.org>
Wed, 3 Jan 2018 16:11:32 +0000 (17:11 +0100)
gtk/gtkscrolledwindow.c

index ece2bb2155d7c19f71873a900ed67401736aa5f1..4f9933e8087f1a34cf37e463754ddd8161ab13ab 100644 (file)
  *
  * If gtk_container_add() has added a #GtkViewport for you, you can remove
  * both your added child widget from the #GtkViewport, and the #GtkViewport
- * from the GtkScrolledWindow, with either of these calls:
+ * from the GtkScrolledWindow, like this:
  * |[<!-- language="C" -->
+ * GtkWidget *scrolled_window = gtk_scrolled_window_new (NULL, NULL);
+ * GtkWidget *child_widget = gtk_button_new ();
+ *
+ * // GtkButton is not a GtkScrollable, so GtkScrolledWindow will automatically
+ * // add a GtkViewport.
  * gtk_container_remove (GTK_CONTAINER (scrolled_window),
  *                       child_widget);
  * // or